import service from '@/api/http'

const userCtrlLog = {
    // 获取用户操作日志列表
    getUserCtrlLog(p) {
        return service.get('/user_ctrl_log', {
            params: p
        })
    },

    // 获取用户操作日志详情
    getUserCtrlLogDetail(p) {
        return service.get('/user_ctrl_log/detail', {
            params: p
        })
    },

    // 导出用户操作日志
    exportUserCtrlLog(p) {
        return service.get('/user_ctrl_log/export', {
            params: p,
            responseType: 'blob'
        })
    },

    // 清空用户操作日志
    clearUserCtrlLog(p) {
        return service.delete('/user_ctrl_log/clear', {
            params: p
        })
    },

    // 获取操作类型统计
    getActionTypeStats(p) {
        return service.get('/user_ctrl_log/stats/action_type', {
            params: p
        })
    },

    // 获取用户操作统计
    getUserActionStats(p) {
        return service.get('/user_ctrl_log/stats/user', {
            params: p
        })
    }
}

export default userCtrlLog 